package university;

import university.exceptions.EmptyStringException;
import university.exceptions.InvalidDateException;

/**
 * Class that describes resposibilities of administration persons(Dean, head of department etc)
 *@author anatolii.bondarenko
 */
class AdministrationPerson extends Teacher{
    private String responsibilities;
    /**
     * Details of administration person
     * @param fn is person's first name
     * @param ln is person's last name
     * @param year is person's year of birth
     * @param month is person's month of birth
     * @param day is person's day of birth
     * @param res is administration responsibilities of person
     */
    public AdministrationPerson(String fn, String ln, int year, int month, int day, String res) throws EmptyStringException, InvalidDateException {
        super(fn, ln, year, month, day);
        responsibilities = res;
        if (res.trim() == ""){
            throw new EmptyStringException("String cannot be empty or consist only of spaces");
        }
    }

    /**
     * Gets resposibilities of adminstration person
     * @return responsibilities of administration person
     */
    public String getResponsibilities(){
        return responsibilities;
    }

}
